<?php

class User_Model_DbTable_AclResource extends Custom_Db_Table_Abstract
{

    public $_name = 'vt_acl_resources';

	/**
	 * Get resources row based on list arrays
	 * @param array $resource
	 */
	public function getByResource($resource)
	{
		if(is_array($resource))
		{
			$where = "resource IN ('".implode("','", $resource)."')";
			$select = $this->select()->where($where);
			return $this->fetchAll($select)->toArray();
		}
		else
		{
			return  $this->getByColumn('resource', $resource);
		}
	}
}

